home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD School House 9
/
CD School House 9.0 - Wayzata Technology (1994).iso
/
pc
/
dos
/
teachaid
/
pccai
/
cai210.doc
< prev
next >
Wrap
Text File
|
1994-05-18
|
31KB
|
887 lines
PC-CAI 2.10
Manual Supplement
TexaSoft, 1993
PC-CAI 2.10 Supplement
Copyright 1993 by TexaSoft.
All rights reserved. Printed in the United States of
America. No part of this book may be used or reproduced in
any form or by any means, or stored in a database or
retrieval system, without prior permission of the publisher
except in the case of brief quotations embodied in critical
articles and reviews. Making copies of any part of this book
for any purpose other than your own personal use is a
violation of United States copyright laws. For information,
address TexaSoft, P.O. Box 1169, Cedar Hill, 75104.
This book and software program is sold as is, without
warranty of any kind either express or implied, respecting
the contents of this book and software program, including
but not limited to implied warranties for the book's or
software's quality, performance, merchantability, or fitness
for any particular purpose. Neither TexaSoft not its dealers
or distributors shall be liable to the purchaser or any
other person or entity with respect to any liability, loss,
or damage caused or alleged to be caused directly or
indirectly by the book or software program.
MANUAL AUTHOR:Alan C. Elliott
PRODUCTION TEAM:Alan C. Elliott, Carol Bigler, Paul Witt,
Nancy Witt
TESTING TEAM: Paul M. Allen (Texas), James Bair
(Conneticut), Randy DeKler (Florida),Tom Dolan (Ireland),
Joyce Epstein (New York), Nicholas Humphries (Australia),
Robert McNary (Montana), Don Moore (Iowa), Mike Pennachi
(Montana) and Joe M. Wolff (New York)
1
PC-CAI 2.10 Manual Supplement
_________________________________________________________
PC-CAI 2.10 INTRODUCTION
========================
This manual supplement describes new program features to the
PC-CAI program not included in the main PC-CAI manual.
Note: Before beginning to use PC-CAI, please be sure to run
the CAI-UTIL program to set up default drives, colors, and
other options for the editor and for CREATE. Also, be sure
to look at the two demo programs called DEMO and CREATE. You
can start these programs at the DOS prompt with the
commands:
CAI DEMO (requires CGA compatible monitor)
and
CAI CREATE
OTHER PC-CAI PROGRAMS/SAMPLES ON DISK
=====================================
PCTUTOR - A CAI tutorial on how to use DOS
MENU - A sample program using the @CASE command
BORDER - Sample borders
BOX - Sample boxes
FUNCTION - Sample use of function keys
VIEW - Sample use of viewer
TESTPCX - Sample use of TXPCX program
And other sample .CAI programs
Run these programs by entering CAI programname at the DOS
prompt.
OTHER PROGRAMS ON DISK
======================
BIGLET - A program to produce BIG letters
PM2IMG - A program to translate Print Master
graphics into PC-CAI IMG graphics.
CAIGRADE - Program that reads GRADE output file and
reports results
For more details about these programs see the section
"Supplemental Programs later in this document."
2
PC-CAI 2.10 Manual Supplement
_________________________________________________________
SUBMIT YOUR OWN SAMPLES
=======================
The SAMPLES.DOC file contains a sample submission form. If
you submit a short sample, and it is used, you will receive
a free one year Extended Support for your PC-CAI program
giving you all updates free for a year.
USING PCX GRAPHICS IN PC-CAI
============================
There are now two ways to display PCX graphics in PC-CAI.
The .PCX command can be used as described in the main
manual, or you can use a new PCX viewer program called
TXPCX. In order to display PCX graphics properly on the
screen using the .PCX command, they need to match the
.SCREEN command. For example, if your PCX file was created
in low resolution CGA mode, you will need to be in SCREEN 1
mode. High Resolution CGA mode is SCREEN 2, and EGA color
mode is SCREEN 9. These are the only modes directly
supported. Displaying PCX graphics that were created in
other modes may distort the graphics picture.
However, there are two other ways to display PCX graphics.
1. Using the CAIPCX Program
2. Using the TXPCX Program
USING THE CAIPCX PROGRAM
========================
The purpose of the CAIPCX program is to display a PCX
graphic file on the screen. This can be used instead of the
.PCX command in PC-CAI.
The format of the command is:
CAIPCX filename pcxmode,y,x,returnmode,returntype
where...
filename - the name of the PCX graphic file
pcxmode - the mode to be used to display the graph (see mode
numbers listed below)
y - vertical location
x - horizontal location
returnmode - the mode that you want to revert to when then program
ends. (see END NOTE below)
3
PC-CAI 2.10 Manual Supplement
_________________________________________________________
returntype - 0 is text, 1 is graphic. Specifies what type you want
to return to when the program ends.
If you leave off returnmode and returntype by using the syntax:
CAIPCX filename pcxmode,y,x
the PCX graphic will be displayed and the PCX viewer program will
immediately end, leaving the graphic on the screen and remaining in
the same mode and type. This is the standard way CAIPCX is used
from PC-CAI when you use the PCX command. If you include a
returnmode and returntype, the PCX graphic will be displayed and
remain on the screen until a key is pressed. Then the screen will
go to the specified returnmode and returntype.
CALLING CAIPCX FROM WITHIN PC-CAI
=================================
If you are using one the standard modes within PC-CAI
(SCREEN 0, 1 or 9), then use the .PCX command as described
in the PC-CAI manual. If you want to display a PCX file in
another mode, use the @SHELL command. For example:
@SHELL(*CAIPCX TESTPCX 4,0,0,0,0*)
Would display the file named TESTPCX in mode 4 (EGA 2
colors) at position 0,0. When a key was pressed, the screen
would revert to CGA text mode. See the table of monitor
modes on the next page.
USING THE TXPCX PROGRAM
=======================
Use the @Shell command to access the TXPCX command. For example,
the syntax of this command is
@SHELL(*TXPCX filename,n*)
where filename is the name of a .PCX file and n is a number
from 10 to 100, designating the size of the PCX file to be
displayed. For example, the command
@SHELL(*TXPCX WOLF,50*)
would display the wolf.pcx graphic as 50% size. See the
program TESTPCX.CAI
4
PC-CAI 2.10 Manual Supplement
_________________________________________________________
Table of Monitor Modes for the CAIPCX Program
--------------------------------------------------
0 - 320 x 200 pixel CGA (4 colors)
1 - 640 x 200 pixel CGA (2 colors)
2 - 320 x 200 pixel EGA (16 colors)
3 - 640 x 299 pixel EGA (16 colors)
4 - 640 x 350 pixel EGA (2 colors)
5 - 640 x 350 pixel EGA (16 colors)
6 - 640 x 480 pixel VGA (2 colors)
7 - 640 x 480 pixel VGA (16 colors)
8 - 320 x 200 pixel VGA (256 colors)
9 - 720 x 348 pixel Hercules (2 colors)
10- 800 x 600 pixel Tseng (256 colors)
11- 640 x 350 pixel Tseng (256 colors)
12- 640 x 480 pixel Tseng (256 colors)
13- 800 x 600 pixel Tseng (256 colors)
14- 800 x 600 pixel Paradise (16 colors)
15- 800 x 600 pixel Paradise (2 colors)
16- 640 x 400 pixel Paradise (256 colors)
17- 640 x 480 pixel Paradise (256 colors)
18- 800 x 600 pixel Video 7 (16 colors)
19- 640 x 400 pixel Video 7 (256 colors)
20- 640 x 480 pixel Video 7 (256 colors)
21- 800 x 600 pixel Video 7 (256 colors)
NEW & IMPROVED "AT" (@) COMMANDS
=================================
The following sections describe new and improved "@"
commands in PC-CAI version 2.10.
CHAINING PROGRAMS (@CHAIN)
==========================
The @CHAIN command allows you to chain a number of programs
together so that when one stops another is automatically
begun. The syntax for this command is
@CHAIN (*FILE*)
This command allows you to exit one PC-CAI program and start
another. It allows you to break your programs into modules
and chain from one to another. For example, suppose you want
to leave one PC-CAI program and begin one named NEWPROG. You
5
PC-CAI 2.10 Manual Supplement
_________________________________________________________
can do this with the command
@CHAIN (*NEWPROG*)
Your old program will be removed from PC-CAI memory, and the
new one will be loaded and run. This enables you to write
longer programs that would not normally fit into the PC-CAI
editor (about 30K). When you chain programs, grading WILL BE
REMEMBERED across chained programs. You will not lose your
count of right, wrong answers or the percentage right grade.
Another aid in writing long programs is the Question Bank
found in the PC-CAI PLUS edition.
NEW GRADE OPTIONS (@GRADE)
==========================
This new command allows you to output grade results at any time.
The syntax for the @GRADE command is
@GRADE [FILE = filename] [SCREEN] [SUMMARY]
The FILE= option allows you to send results to a file. If SUMMARY
is used with the FILE= command, only the final summary of the grade
is reported instead of the results of each individual question. The
SCREEN option causes the grade report to be displayed to the
screen. See also the @STOP command.
NEW IF OPTIONS (@IF)
====================
New to the @IF command is a GRADE condition. You can now use the
@IF command to branch the program according to the current grade.
For example, you can use the statements
@IF GRADE < ## then :LABEL
or
@IF GRADE > ## then :LABEL
where ## is a number between 0 and 100. If the condition is
met, the program will branch to the designated label. For
example:
@IF GRADE<90 then :WASLESS
Your score is 90 or above
@GOTO:SKIPGRADE
@LABEL:WASLESS
Your score is less than 90
6
PC-CAI 2.10 Manual Supplement
_________________________________________________________
@LABEL:SKIPGRADE
continue...
MENUING COMMAND (@CASE)
=======================
You can now use the options NOBOX and NOCHOICE in the @CASE
command. The NOBOX option causes the command to display the
@CASE information without a box and the NOCHOICE option
causes the command information to be displayed without the
"Enter Choice:" option being displayed. This allows you more
freedom in using this command.
OPTIONS GOTO (@OPTIONS)
=======================
A new option in the @OPTION command is ESCAPE:Label. This option
allows you to specify where the program will go when the user
presses the Esc key. For example, the command
@OPTION ESCAPE:MENU
would cause the user to be sent to the label called
@LABEL:MENU
in the program when the Esc button was pressed.
ZERO OUT GRADING (@RESTORE)
===========================
The @RESTORE command zeros out counting for question
grading. Thus, if you have some preliminary questions to ask
before starting to keep records, place the @RESTORE command
right before you want to start counting right and wrong
answers.
STOP COMMAND ENHANCEMENTS (@STOP)
=================================
The syntax for the @STOP command is
@STOP GO:LABEL
A new option to the @STOP command is GO:Label. When you use
the @STOP command with the GO:Label option, the program will
end, then resume at the label specified in the GO:Label
option. For example:
7
PC-CAI 2.10 Manual Supplement
_________________________________________________________
@STOP GO:AGAIN
would cause the program to stop, then begin again at the
label named AGAIN. Other options to the @STOP command
include the GRADE SUMMARY
@STOP GRADE SUMMARY
This causes the grade option to output only the final
summary of the grade rather than the result of each
individual question. See also the new @GRADE command.
NEW PC-CAI 2.10 DOT COMMANDS
============================
The following commands are new and enhanced commands for
version 2.10.
MAKING BORDERS (.BORDER)
========================
The syntax for the border command is
.BORDER (*a,b,c,d) [double] [fill]
where a,b,c,d are the coordinates for the top left (a,b) of the
border and the bottom right (c,d). Examples:
.bord (*1,1,20,70*)
.bord (*1,1,20,70*) double
.bord (*1,1,20,70*) fill
.bord (*1,1,20,70*) double fill
Putting a color command just before the .bord command will
allow you to display the border in a color. Place another
.color just after the .bord command to return to your
default color. For example:
.color 4,7
.bord(*10,10,20,65*)
.color 15,1
See also the sample program called BORDER.CAI.
8
PC-CAI 2.10 Manual Supplement
_________________________________________________________
MAKING BOXES (.BOX)
===================
The box command allows you to create boxes containing text. The
syntax of the command is
.box (*x,y*) [border] [right|center] [shadow]
:
text
:
.endbox
Where x and y are the coordinates of the top left of the
box. The width and length of the box are determined by the
text. For example:
.cls
.box (*10,12*) border right
Place the box to the right, no shadow
This is the first line
This is the second line
Last line, special character (.CHR225)
.endbox
To make a box a different color from the screen and text
colors surrounding it, put the colors for the box
immediately before the .box command. Resume the default
screen colors with another .color command immediately after
the .endbox. For example:
.color 4,7
.box (*10,10*) border center
Exercise Two
.endbox
.color 15,1
See also the program called BOX.CAI.
9
PC-CAI 2.10 Manual Supplement
_________________________________________________________
SPECIAL CHARACTER DISPLAY
=========================
To print a special character (any ASCII character), you can
use the command
(.CHR###)
where ### is the ASCII code for a character. For example,
the code (.CHR225) would display the ASCII character number
225 (an alpha). For an example, see the program BOX.CAI.
NEW (.INF) OPTIONS
==================
The (.INF #) command is used to store information gathered
from a .INFORMATION command. Two new ways of using the
command are as follows: If you embed the command (.) in
output, the (.) will be replaced with the answer given for
the last questions. For example, you could use the following
in a program:
Your answer was (.) for the last question.
If the answer was WASHINGTON, for example, this would be
displayed as Your answer was WASHINGTON for the last
question. Three new defined meanings for (.INF #) are as
follows (.INF 11) is the current number of RIGHT answers.
(.INF 12) is the current number of WRONG answers. (.INF 13)
is the current PERCENT RIGHT grade (for example 80 for 80%
right) This information can be displayed at any time. For
example, you could use the statement: Your current score on
this test is (.INF 13). See also a new option in the @IF
command.
DEFINE FUNCTION KEYS (.FUN)
===========================
The new .fun command allows you to define the meaning of the
function keys. The syntax for the command is
.fun# =GO:label or
.fun# =SHELL:command
This command allows you to define what will happen when the
user presses a function key. The GO option causes the
10
PC-CAI 2.10 Manual Supplement
_________________________________________________________
program to go to a label. The SHELL option causes the
program to shell to DOS and execute the command specified.
For example, to cause the PC-CAI Help to appear when F1 is
pressed, you would use the command:
.fun1 =shell:txhelp cai.hlp
You can create your own help file using the structure of the
current CAI.HLP file. For an example of using functions see
the program FUNCTION.CAI.
RECORD COMMAND CHANGES (.RECORD)
================================
If you include the option TIME at the end of the record
command, the output will include the system time appended to
the end of the output line. This allows you to tell when an
event took place. If you place a record before and after a
question, you can tell when the question was answered, and
how long between the display of the question, and the end.
VIEW A FILE (.VIEW)
===================
This command allows you to view the contents of an ascii
(text) file. The syntax of the command is:
.view (*filename*)
The viewer will appear, and the user can scroll up or down.
This can be used if you want the user to be able to read and
review a long passage before going forward in the program.
When viewing a file, you can change colors at any time by
including the following code on a line ( ). These
are the same colors used in the .COLOR command. You can
perform more than one color change on a line. For example:
This is an (~15,2~)IMPORTANT!(~15,1~) message.
For an example of the view command see the program VIEW.CAI.
11
PC-CAI 2.10 Manual Supplement
_________________________________________________________
PC-CAI RUNTIME NOTES
====================
The following sections contain other information about new
features in version 2.10
BRUN40.EXE FILE NO LONGER NEEDED
================================
To distribute a CAI program, you must include the CAI.EXE
runtime program on disk. In earlier versions, you had to
also include the file BRUN40.EXE on disk. A change in the
way CAI is now compiled means that the file BRUN40.EXE is no
longer required to run CAI.EXE. However, there are a couple
of extra program files that you need to know about, and
which you can place on the disk of a program you are
distributing. These are:
CAIPCX.EXE - This file needs to be on disk if the command
".PCX" is used in a program. It is the command that allows
you to display PCX graphics.
TXPCX.EXE - This file is needed if you use this program to
display PCX graphics.
Therefore, to distribute a CAI program, all you need to
include on the disk is the file CAI.EXE. However, if you can
optionally include the other files as needed. YOU MUST BE
A REGISTERED USER BEFORE YOU CAN DISTRIBUTE PROGRAMS USING
THE CAI RUNTIME MODULES.
The "runtime" program (CAI.EXE) is now separate from the
editor, so there is no possibility that an encoded file can
be edited. The editor will not edit an encoded file. You
must run an encoded file through the decoder first in order
to edit it.
To begin editing a file, use the CAIEDIT command. To run a
CAI program from DOS, use the command
@INDENT = CAI filename
12
PC-CAI 2.10 Manual Supplement
_________________________________________________________
DEFINE ALT KEYS
===============
By placing key definitions in a file called CAIKEYS.DAT, you
can define meaning for an ALT-KEY combination. For example,
if the following information is in this file:
A=ü
B=é
C=â
d=ä
e=à
For example, whenever you hold the Alt-key down and
simultaneously press the B key, an e with an accent will
appear. This works both in the editor and in a CAI tutorial.
Therefore, you can use it for creating a tutorial, and the
person taking the tutorial can use it to enter answers in a
program. The only restriction is that you cannot use ASCII
characters above 250. You will have to inform your audience
what the keys mean.
SUPPORT FOR SOUND BLASTER
=========================
If your computer is equipped with a sound blaster and the
SBTALKER software, you can cause CAI to "talk". SBTALKER
must be installed prior to running PC-CAI. Usually, it is
with a DOS command such as
sbtalker /dblaster
Then, you can use the .TALK (*something*) command to cause
yourprogram to talk. For example:
.talk (*This is a test of talker*)
If SBTALKER is not loaded, the command is ignored -- thus
you can put it in your code and it will not cause a problem
if the person running the program does not have Sound
Blaster.
Note: SBTALKER makes a good effort at pronouncing words.
However, sometimes you may have to spell a word phonetically
for it to sound right.
13
PC-CAI 2.10 Manual Supplement
_________________________________________________________
CAI STARTUP MODE CHANGES
========================
A change has been made so CAI does not automatically clear
the screen when begun. This allows you to display a message
on the screen using a batch file that will not be erased
until the program takes over. This comes in handy when you
are beginning a program from an encoded file, which may take
some time before appearing on the screen. For example, you
might want to use a batch file like this:
ECHO OFF
CLS
REM put some message here
CAI MYPROG
Then, your message will be on the screen until the MYPROG program
takes over.
SUPPLEMENTAL PROGRAMS
=====================
1. The BIGLET program allows you to create big letters. This
is useful for creating large titles for your PC-CAI
programs. Save the results to a file, then merge the file
into your CAI program using the editor (or the .USE
command). Begin the BIGLET program from DOS with the
command BIGLET.
2. The CAIGRADE program will summarize the output of a CAI
tutorial for which you have used the GRADE option. The .BAS
(Basic language) source code is included so you can modify
this program for your own use. Begin the CAIGRADE program
from the DOS prompt with the command CAIGRADE.
If you have two or more grade output files (say from
separate disks), use the copy command to append them
together before running the CAIGRADE program on them. For
example, say you have the files GRADE1.OUT, GRADE2.OUT and
GRADE3.OUT. You could create a file named GRADE.OUT with the
DOS copy command:
COPY GRADE1.OUT+GRADE2.OUT+GRADE3.OUT GRADE.OUT
3. The PM2IMG program translates Print Master (PM) shape
files to TexaSoft PC-CAI Image (IMG) files. To translate PM
files, you should have a SDR and SHP file. The example on
14
PC-CAI 2.10 Manual Supplement
_________________________________________________________
disk are files called CARLOGOS.SHP and CARLOGOS.SDR. Begin
the program at the DOS prompt with the command
PM2IMG
You will be asked to enter the name of the PM file to convert.
Enter the name. For this example, it would be
CARLOGOS
The translation will take place, and each image will appear
on the screen as it is translated. The result will be an IMG
file for each PM Shape. You may now use these images in the
PC-CAI program or edit them in the PC-CAI Image Editor.
Note: The PM2IMG will not translate shape files from the New
Printshow, only from the older editions.
4. Files with a .CAI extension are sample PC-CAI programs.
These are here to give you examples of how to write your own
programs. You may use parts of these programs to create your
own programs. If you have sample programs you would like to
donate to this disk, please send them to TexaSoft, PO Box
1169, Cedar Hill, Texas 75104. (See the SAMPLES.DOC file on
the PC-CAI disk). For example, the COLORS.CAI program,
donated by Don Moore of Teikyo Marycrest University (Iowa),
helps you choose color combinations for screen.
15